-
Notifications
You must be signed in to change notification settings - Fork 31
(#Towards 2302) intrinsic argument names #3150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
I think we could also delete the IAttr class entirely and replace it with |
I quickly tried this and decided its worse because you can't pass named arguments to |
|
I've fixed the remaining problems with the test suite. I expect there will be some coverage changes I need to look at next, notably I expect there are now unreachable sections of fparser2.py that I can remove, but I will wait to see what pycov says and go from there in case there are other sections I either miss testing or that can now be removed. One option I leave up to the review is whether to add something to the backend to not output argument names, as we will now be very explicit and add argument names wherever possible (assuming an IntrinsicCall has been canonicalised). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3150 +/- ##
========================================
Coverage 99.90% 99.90%
========================================
Files 374 374
Lines 53011 53165 +154
========================================
+ Hits 52958 53112 +154
Misses 53 53 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@arporter @sergisiso This is ready for a first look now. |
I haven't seen the clarification commit yet but I have been looking at the code and it seems we don't do re-ordering anymore. The frontend (through create) just tries to match the interface and give names, and produces a CodeBlock if it can't. The transformations should be using the If that's the case, maybe we don't need the flag? This seems a good output style (no names while they match the order, named afterwards or in case of doubt). It also prevents the NEMO sign issue. And I am not too keen on having output style knobs. What do you think @arporter @LonelyCat124 about making that the backend behaviour (no options needed). That said, NEMOv5 fails with a wrong arg-name that will need to be fixed: |
|
Also, I am not sure To be clear, I am not suggesting any implementation change, just renaming the method and associated comments. |
|
It does a bit more than naming arguments: it works out which version of an intrinsic is being called. Perhaps |
I debated this previously when i stopped reshaping, but I felt like we still end up with a canonicalised (standard w.r.t argument names, but not argument order) version of the IntrinsicCall so I didn't rename it. I can rename if you feel strongly about it though. Either way I probably need to check over the docstring and docs.
It only removes required argument names (as I think optional ones should be left in generally). |
|
My problem with
I will let you two decide about this. I don't think I care too much about the output style as far as is readable and reasonable. The previous backend options are to bypass issues. Going down to provide style options could make the backend much more complex and I am not sure this is the focus of psyclone. But if it is just this one it is not a big deal. |
|
Yeah I'm fine to change it then. I'll look at doing that after the bug fix. I'm also happy I think to change the default output and have an option to enable argument names separately. |
|
I broke all the sympy stuff again when switching the default behaviour :'( |
…es in its definition
|
Hopefully integration works now, there was one badly defined intrinsic (capitalized argument names which docs say we shouldn't have) that I've fixed and I'm hoping was the remaining issue. |
|
@arporter I think this is ready for another look now - I've fixed the issues discussed and the NEMO4 integration tests work - I'm waiting on the others to finish running but the first LFRic attempt had the signal 11 issue from the Nvidia compiler so I've set it rerunning. |
Could be closes, not sure, up to review.
Work in progress on doing this, remaining steps I have for this PR: